/**
 * 
 */
package com.p2p.front.dal.dao;

import java.util.List;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.p2p.base.dao.BaseMapper;
import com.p2p.front.dal.model.SysConfig;

/**
 * @author ruiqi
 *
 */
public interface SysConfigDao extends BaseMapper{

	/**
	 * 保存or覆盖
	 * 
	 * @param sysConfig
	 */
	@Update("replace into p2p_sys_config(syskey,value,memo)values(#{syskey},#{value},#{memo})")
	public void save(SysConfig sysConfig);
	
	/**
	 * 获取全部
	 * 
	 * @return
	 */
	@Select("select syskey,value,memo from p2p_sys_config")
	public List<SysConfig> getAll();
	
	/**
	 * 获取
	 * 
	 * @param key
	 * @return
	 */
	@Select("select syskey,value,memo from p2p_sys_config where syskey=#{key}")
	public SysConfig getByKey(String key);
}
